package com.teacher.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.teacher.common.CommonResult;
import com.teacher.pojo.dto.login.LoginDto;
import com.teacher.pojo.dto.teacher.TeacherAddDto;
import com.teacher.pojo.dto.teacher.TeacherGetByDeptDto;
import com.teacher.pojo.dto.teacher.TeacherUpdateDto;
import com.teacher.pojo.entity.PerTeacher;
import com.teacher.pojo.vo.teacher.LoginVo;
import com.teacher.pojo.vo.teacher.TeacherGetVo;
import com.teacher.pojo.vo.teacher.UserInfoVo;
import com.teacher.security.entity.permission.MenuReturnVo;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zfm
 * @since 2021-06-15
 */
public interface IPerTeacherService extends IService<PerTeacher> {
    /**
     * 登录
     *
     * @param dto
     * @return
     */
    CommonResult<LoginVo> login(LoginDto dto);

    /**
     * 获取用户菜单
     *
     * @return
     */
    CommonResult<Object> getMenu();

    /**
     * 用户登出
     *
     * @return
     */
    CommonResult<String> logout();

    /**
     * 根据部门ID查询教师信息
     *
     * @param dto
     * @return
     */
    CommonResult<IPage<TeacherGetVo>> getByDepartmentId(TeacherGetByDeptDto dto);

    /**
     * 更新用户信息
     *
     * @param dto
     * @return
     */
    CommonResult<String> updateInfo(TeacherUpdateDto dto);

    /**
     * 获取用户信息
     *
     * @return
     */
    CommonResult<UserInfoVo> getUserInfo();

    /**
     * 添加用户
     *
     * @param dto
     * @return
     */
    CommonResult<String> add(TeacherAddDto dto);

    /**
     * 修改用户角色
     * @param roleId
     * @return
     */
    CommonResult<String> exchangeRoles(Long roleId);
}
